package com.ssy.lingxi.settle.accounts.model.vo.request;


import com.ssy.lingxi.settle.accounts.handler.annotation.DateStringFormatAnnotation;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 结算商品信息VO，用于生成对账单行明细数据
 * @author Saske
 * @date 2021/12/19
 * @version 2.0.0
 */
public class SettlementProductVO implements Serializable {

    private static final long serialVersionUID = -8883698249570038L;

    /**
     * 结算商品信息ID
     */
    @NotNull(message = "结算商品ID不能为空")
    private Long productId;

    /**
     * 预计结算日期,日期格式必须为yyyy-MM-dd
     */
    @DateStringFormatAnnotation
    private String expectPayTime;

    /**
     * 物料编号
     */
    private String productNo;

    /**
     * 物料名称
     */
    private String productName;

    /**
     * 商品规格/型号
     */
    private String spec;

    /**
     * 商品品类
     */
    private String category;

    /**
     * 商品品牌
     */
    private String brand;

    /**
     * 单位
     */
    private String unit;

    /**
     * 税率（百分比的分子部分）
     */
    @NotNull(message = "税率不能为空")
    @PositiveOrZero(message = "税率要大于或等于0")
    private BigDecimal taxRate;

    /**
     * 单价（含税）
     */
    @NotNull(message = "单价不能为空")
    @PositiveOrZero(message = "单价要大于或等于0")
    private BigDecimal price;

    /**
     * 待对账数量
     */
    @NotNull(message = "待对账数量不能为空")
    @PositiveOrZero(message = "待对账数量要大于或等于0")
    private BigDecimal reconciliationQuantity;

    /**
     * 待对账金额（含税）
     */
    @NotNull(message = "待对账金额不能为空")
//    @PositiveOrZero(message = "待对账金额要大于或等于0")
    private BigDecimal reconciliationMoneyAmount;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getExpectPayTime() {
        return expectPayTime;
    }

    public void setExpectPayTime(String expectPayTime) {
        this.expectPayTime = expectPayTime;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getReconciliationQuantity() {
        return reconciliationQuantity;
    }

    public void setReconciliationQuantity(BigDecimal reconciliationQuantity) {
        this.reconciliationQuantity = reconciliationQuantity;
    }

    public BigDecimal getReconciliationMoneyAmount() {
        return reconciliationMoneyAmount;
    }

    public void setReconciliationMoneyAmount(BigDecimal reconciliationMoneyAmount) {
        this.reconciliationMoneyAmount = reconciliationMoneyAmount;
    }
}
